package com.xja.entity;

import java.io.Serializable;

/**
 * @author 周广瑞
 * @date 2022/4/26 11:01
 */
public class PageResult<T> implements Serializable {
   private String status;
   private String msg;
   private T obj;
    public PageResult() {
    }
   public static PageResult success(String msg,Object obj){
       return new PageResult("succes",msg,obj);
   }
    public static PageResult error(String msg,Object obj){
        return new PageResult("error",msg,obj);
    }

    public static PageResult nullresult(String msg,Object obj){
        return new PageResult("none",msg,obj);
    }
    public PageResult(String status, String msg, T obj) {
        this.status = status;
        this.msg = msg;
        this.obj = obj;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getObj() {
        return obj;
    }

    public void setObj(T obj) {
        this.obj = obj;
    }

    @Override
    public String toString() {
        return "PageResult{" +
                "status='" + status + '\'' +
                ", msg='" + msg + '\'' +
                ", obj=" + obj +
                '}';
    }
}
